home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 9969 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: rap.SanDiegoCA.ATTGIS.COM!not-for-mail
  2. From: susanc@news.SanDiegoCA.ATTGIS.COM (susan cassidy)
  3. Newsgroups: comp.unix.questions,comp.lang.c
  4. Subject: Re: Bold ASCII
  5. Date: 14 Mar 1996 08:33:04 -0800
  6. Organization: AT&T Global Information Solutions, San Diego, CA
  7. Message-ID: <4i9ho0$3i0@ssd3450.SanDiegoCA.ATTGIS.COM>
  8. References: <4i7cpj$hqa@nexen.nexen.com>
  9. NNTP-Posting-Host: ssd3450.sandiegoca.attgis.com
  10.  
  11. In article <4i7cpj$hqa@nexen.nexen.com>,
  12. Matthew B. Doar <mdoar@nexen.com> wrote:
  13. >Anyone know how to get bold strings of text
  14. >from a program (termcap related?)
  15. >
  16. >e.g.
  17. >
  18. >printf("\012 This is in bold \013\n");
  19. >
  20. >where \012 and \013 are whatever the magic ascii values 
  21. >are to turn on and off bold. 
  22. >
  23. >~Matt
  24.  
  25. My system uses terminfo, not termcap, but the principal should be the 
  26. same.  My documentation says that terminfo bold is called md in
  27. termcap, and sgr0 is called me in termcap.  Sample that I tested:
  28.  
  29. MSG="`tput bold`BOLD OUTPUT `tput sgr0`"
  30. echo "NORMAL TEXT"
  31. echo $MSG
  32. echo "NORMAL AGAIN"
  33.  
  34. Using tput makes this terminal independent, as bold, reverse, blink,
  35. etc. are depending on the exact terminal or terminal emulation mode
  36. you are using.
  37. -- 
  38. Susan Cassidy
  39. email: susan.cassidy@sandiegoca.ncr.com
  40.